<template>
  <div class="container">
    <div class="card" ref="card">
      <img src="~/assets/img/spiderman.png" alt="spiderman" />
      <p>SPIDERMAN</p>
    </div>
  </div>
</template>
<script>
import VanillaTilt from "vanilla-tilt";
export default {
  mounted() {
    VanillaTilt.init(this.$refs.card, {
      max: 35,
      speed: 400,
      scale: 1.2,
      transition: true,
      easing: "cubic-bezier(.03,.98,.52,.99)",
      glare: true,
      "max-glare": 0.5,
    //   "glare-prerender": false,
    });
  },
};
</script>

<style>
.container {
  height: 100vh;
  background: #95a5a6;
  display: flex;
  justify-content: center;
  align-items: center;
}
.card {
  width: 300px;
  height: 500px;
  background: #3498db;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  transform-style: preserve-3d;
  transform: perspective(1000px);
  cursor: pointer;
}
img {
  width: 70%;
  transform: translateZ(200px);
}
p {
  font-size: 20px;
  font-weight: bold;
  transform: translateZ(100px);
}
</style>
